#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "Service.h"
#include "Private.h"
#include <unistd.h>
#include <fcntl.h>

/// <summary>
/// TODO
/// </summary>
int Booting(void)
{
	/* INIT */
	//if (getpid() != 1)
	//	return -1;

	if (FileExists(SERVICE_LIST) < 0)
		return -1;

	if (ReaderOpen(SERVICE_LIST) < 0)
		return -1;

	Service service;
	while (ReaderNextService(&service) > 0)
		printf("Service: %s\n", service.Name);

	ReaderClose();

	return 0;
}
